export function parseLinkToMarkdown(blocks) {
  return `[${blocks.meta.title}](${blocks.link} "${blocks.meta.description}")`.concat('\n');
}

export function parseMarkdownToLink(blocks) {
  const codeData = {
    data: {
      link: blocks.link,
      meta: {
        title: blocks.meta.title,
        description: blocks.meta.description
      }
    },
    type: 'link',
  };

  return codeData;
}
